<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
  'id'=>'config-form',
  'enableAjaxValidation'=>false,
)); ?>

  <p class="note">Fields with <span class="required">*</span> are required.</p>

  <?php echo $form->errorSummary($model); ?>

  <div class="row">
    <?php echo $form->labelEx($model,'name'); ?>
    <?php echo $model->name; ?>
    <?php echo $form->error($model,'name'); ?>
  </div>

  <div class="row">
    <?php echo $form->labelEx($model,'data_en'); ?>
    <?php
    if ($model->with_editor) {
      $this->widget('application.extensions.tinymce.ETinyMce',
        array(
          'editorTemplate'=>'full',
          'model' => $model,
          'attribute' => 'data_en'
        )
      );
    }else {
      echo $form->textArea($model,'data_en',array('rows'=>6, 'cols'=>50));
    }
    ?>
    <?php echo $form->error($model,'data_en'); ?>
  </div>

  <div class="row">
    <?php echo $form->labelEx($model,'data_th'); ?>
    <?php
    if ($model->with_editor) {
      $this->widget('application.extensions.tinymce.ETinyMce',
        array(
          'editorTemplate'=>'full',
          'model' => $model,
          'attribute' => 'data_th'
        )
      );
    }else {
      echo $form->textArea($model,'data_th',array('rows'=>6, 'cols'=>50));
    }
    ?>
    <?php echo $form->error($model,'data_th'); ?>
  </div>

  <div class="row buttons">
    <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
  </div>

<?php $this->endWidget(); ?>

</div><!-- form -->